<script type="text/javascript">

</script>
<head>
    <script src="js/jquery.maskedinputs.js" type="text/javascript"></script>
    <script src="js/cobros.js" type="text/javascript"></script>
    <script src="js/pagos.js" type="text/javascript"></script>
    <script src="js/monedas.js" type="text/javascript"></script>
    <script src="js/movimientos.js" type="text/javascript"></script>
</head>
<body onload="getPagos()">
    <div style="height: 35px;"></div>
    <table id="pagos" border="0" style="width: 100%;">
        <tbody>
            <tr><td colspan="8"><h1>Caja > Pagos</h1></td></tr>
            <tr>
                <td>Descripción</td>
                <td><input type="text" id="txtPagosDescr" name="txtPagosDescr" value=""  class="generalInput search"/></td>
                <td>Importe</td>
                <td><input type="text" id="txtPagosImporte" name="txtPagosImporte" value=""  class="generalInput search"/></td>
                <td>Cuenta</td>
                <td>
                    <SELECT name="cboPagosCuenta" id="cboPagosCuenta" class="generalInput">
                        <?php
                        require_once './src/MyDBi.php';
                        $db = new MysqliDb();
                        $db->where("NroCuenta like '5.%'");
                        $results = $db->get("cuentas");
                        foreach ($results as $row) {
                            echo "<option value=" . $row["NroCuenta"] . ">" . $row["Nombre"] . "</OPTION>";
                        }
                        ?>
                    </SELECT>
                </td>
                <td>Origen</td>
                <td>
                    <SELECT name="cboPagosOrigen" id="cboPagosOrigen" class="generalInput">
                        <option value="1.1.1.01">Caja Chica</option>
                        <option value="1.1.1.10">Caja</option>
                        <option value="1.1.1.21">Banco Patagonia</option>
                    </SELECT>
                </td>
                <td colspan="1"></td><td><input type="button" value="Guardar" name="save" onclick="savePago()" class="btnSave"/></td>
            </tr>
            <tr>
                <td>Fecha Desde</td>
                <td><input type="text" id="txtPagosFechaDesdeSearch" name="txtPagosFechaDesdeSearch" value=""  class="generalInput search"/></td>
                <td>Fecha Hasta</td>
                <td><input type="text" id="txtPagosFechaHastaSearch" name="txtPagosFechaHastaSearch" value=""  class="generalInput search"/></td>
                <td></td>
                <td>
                    
                </td>
                <td></td>
                <td>

                </td>
                <td colspan="1"></td><td><input type="button" value="Filtrar" name="filter" onclick="filterPagos();" class="btnSearch"/></td>
            </tr>
            <tr>
                <td colspan="12">
                    <table id="results" class="resultsHeader" style="width: 100%;" cellspacing="0" cellpadding="0" border="0">
                        <thead >
                            <tr >
                                <th style="width: 10px;" >Fecha</th>
                                <th >Cuenta</th>
                                <th >Descripción</th>
                                <th>Importe</th>
                                <th>Detalles</th>
                                <th colspan="2">Acciones</th>
                            </tr>
                        </thead>
                        <tbody id="listado">

                        </tbody>    
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    <input type="hidden" id="hRol" value="<?php echo $_SESSION['remises_rol'] ?>"/>
    <div id="resultadosServer" class="resultadosServer" ></div>

</body>
